package Semester_2.src.Util_4;

public class useSleep {
    public static void Wait(long a){
        for(int i=0;i<a;i++){
            System.out.println(i+1+"秒");
            try{
                //静态方法调用sleep()方法
                Thread.sleep(1000);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
